A Direct Memory Access (DMA) subsystem is a common component in modern computers. The DMA subsystem allows a device or process in a host system to transfer data from a source location to a destination location without creating a significant load on the host's Central Processing Unit (CPU). Without the DMA subsystem, the CPU would have to perform each operation involved in copying the data from one place to another, generally over a bus. Transfers over a bus tend to be slower than transfers using normal system RAM. Without the DMA subsystem, the CPU would be unavailable for other computational and control tasks for the duration of the transfer. With the DMA subsystem, the CPU initiates the transfer, and the DMA subsystem performs the actual copying of the data, leaving the CPU available for other computational and control tasks.
A DMA subsystem may be implemented as a DMA device coupled to a bus which is also coupled to a host. For example, an expansion card, such as a PCI Express card, may implement a DMA subsystem. A client device generates a DMA request identifying a region of host memory as the source location and a region of DMA memory as a destination location, or other source or destination location, such as another device. Software running on the host generates a DMA descriptor in response to the DMA request, stores the descriptor in host memory, and signals the DMA subsystem that a new descriptor is pending. The DMA subsystem transfers the descriptor from host memory to a working memory of the DMA subsystem and performs the request specified by the descriptor.
A DMA descriptor is a data structure stored in memory. The descriptor specifies the parameters of a DMA request. While stored in the host memory and waiting for the DMA subsystem, an error may corrupt the descriptor. In addition, when the DMA subsystem transfers the descriptor over the bus and into the working memory, a transit error may corrupt the descriptor. If any of these events occurs, there is a potential for further damage to data stored in the memory of the host or elsewhere. For example, a corrupted descriptor may instruct the DMA subsystem to copy the wrong data to the wrong place. The resulting state of the memory as modified by the DMA subsystem does not match the DMA request and may be detrimental to the host or client device.